// *******************************
//  Ajax XMLHttpRequest functions
//  [cy] 2006 - 07 - 05
// *******************************
//var httpRequest = null;

function createXMLHttpRequest() {
	if (window.ActiveXObject) {
		try {
			return  new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try	{
				return new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e1) { return null; }
		}
	} else if ( window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else { return null; }
}

function sendRequest(url, params, callback, method)
{
	var httpRequest = null;
	httpRequest = createXMLHttpRequest();
	var httpMethod = method ? method : 'GET';
	if (httpMethod != 'GET' && httpMethod != 'POST')
	{
		httpMethod = 'GET';
	}

	var httpParams = (params == null || params == '') ? null : params;
	var httpUrl = 'http://192.168.1.108:88/ebook/gallery/proxy';
        httpUrl += '?proxyurl=' + url;
	if (httpMethod == 'GET' && httpParams != null)
	{
		httpUrl += "&" + httpParams;
	}

	httpRequest.open(httpMethod, httpUrl, true);
	httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	httpRequest.onreadystatechange = callback;
	httpRequest.send(httpMethod == 'POST' ? httpParams : null);
}

function callXMLHttpAsync(url, params, callback, method)
{
	var httpRequest = null;
	httpRequest = createXMLHttpRequest();
	var httpMethod = method ? method : 'GET';
	if (httpMethod != 'GET' && httpMethod != 'POST')
	{
		httpMethod = 'GET';
	}

	var httpParams = (params == null || params == '') ? null : params;
	var httpUrl = 'http://192.168.1.108:88/ebook/gallery/proxy';
        httpUrl += '?proxyurl=' + url;
	if (httpMethod == 'GET' && httpParams != null)
	{
		httpUrl += "&" + httpParams;
	}

	httpRequest.open(httpMethod, httpUrl, true);
	httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	httpRequest.onreadystatechange = function(){callback.call(this, httpRequest)};
	httpRequest.send(httpMethod == 'POST' ? httpParams : null);
}

function openHdShow(href){
    var w = window.screen.width;
    var h = window.screen.height;
    window.open(href,'', 'width=' + w + ', height=' + h + ', top=0, left=0, scrollbars=no,toolbar=no,menubar=no,resizable=yes,fullScreen=yes,status=no,location=no');
    return false;
}

var optiontds = $('#option td');
var hashdebook = $('#hashd').val();
$(optiontds[0]).hide();
$(optiontds[1]).hide();
$(optiontds[2]).hide();